package com.huilian.iotbox.admin.wap.dao;

import com.huilian.iotbox.data.dto.OrderDto;
import com.huilian.iotbox.data.po.Order;
import com.huilian.iotbox.data.vo.OrderVo;
import com.huilian.iotbox.data.vo.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author 谢洛涛
 * @date 2021/1/9 12:22
 */
@Mapper
public interface OrderDao {
    List<OrderVo> findOrderList(OrderDto orderDto);

    BigDecimal statisticsDayIncome(OrderDto orderDto);

    OrderVo findOneOrderByOutTradeNo(@Param("outTradeNo") String outTradeNo, @Param("userInfo") UserInfo userInfo);


    OrderVo findSuccessTotalAmount(OrderDto orderDto);



    List<OrderVo> findSuccessTotalAmountList(OrderDto orderDto);

    List<OrderVo> findDenominationCountByDeviceNo(OrderDto orderDenomination);

    List<OrderVo> findDenominationCountByMerchantStoreId(OrderDto orderDenomination);

    List<OrderVo> findOrderListByApplet(OrderDto orderDto);

    OrderVo findOrderStatisticsByApplet(OrderDto orderDto);

    List<OrderVo> findDenominationCountByPermission(OrderDto orderDenomination);

    List<OrderVo> findOrderListByBranch(OrderDto orderDto);

    Integer checkOrderCode(OrderDto orderDto);


    List<OrderVo> findOrderListCashAndOwn(OrderDto orderDto);

    List<Order> findOrderListByMerchantStoreId(OrderDto orderDto);

    Integer updateRemark(OrderDto orderDto);

    OrderVo findOrderIdMerchantStore(OrderDto orderDto);

    BigDecimal statisticsOneMemberAllTurnoverByMemberId(@Param("userInfo") UserInfo userInfo, @Param("memberId") Long memberId, @Param("merchantStoreId") Integer merchantStoreId, @Param("mchTypeArray") int[] mchTypeArray);


    /**
     * 查询所有订单数据中的commodityStoreUpDownIdList，test方法使用
     */
    List<Order> findOrderListTest();

    List<OrderVo> findOrderListByBranchScanCode(OrderDto orderDto);

    OrderVo statisticsDayData(OrderDto orderDto);

    Order findByOrderId(Long orderId);

    List<OrderVo> findOrderStoreListByBranch(OrderDto orderDto);

    List<OrderVo> findOrderStoreListByBranchScanCode(OrderDto orderDto);
}
